﻿using Domain.Engine.Commands;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Domain.Engine.Tests
{
  [TestClass]
  public class Game_engine_tests : DomainTestBase
  {
    [TestMethod]
    public void New_board_should_be_empty()
    {
      var emptyBoard = new Cell[8,8];
      for (int row = 0; row < 8; row++)
      {
        for (int col = 0; col < 8; col++)
        {
          emptyBoard[row, col] = new Cell();
        }
      }
      Game.Board.Print();
      Game.Board.Cells.ShouldBeEquivalentTo(emptyBoard);
    }

    [TestMethod]
    public void Initial_position_of_chess()
    {
      var command = new NewGameCommand();
      CommandBus.Send(command);
      Game.Board.Print();
      Game.Board.Cells[1, 0].ToString().Should().Be("BP");
    }
  }
}